﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace BDS3M
{
    public partial class TimKiemSanGiaoDich : System.Web.UI.Page
    {
        public static string content;
        public static int sizePage;
        public static int currentPage;

        public string catName;
        public static DataTable dt;
        public static int AllCat;

        protected void Page_Load(object sender, EventArgs e)
        {

            //if (!Page.IsPostBack)
            //{
            //    if (BDS3M.Controls.ListContentSanGiaoDich.column == null) BDS3M.Controls.SortProduct.column ="SanGiaoDich";
            //    if (BDS3M.Controls.SortProduct.sort == null) BDS3M.Controls.SortProduct.sort = "DESC";
            //    sizePage = Convert.ToInt32(ConfigurationManager.AppSettings["sizepage"].ToString());

            //    if (Request.QueryString["currentPage"] != null)
            //    {
            //        if (Request.QueryString["content"] != null)
            //            content = (Request.QueryString["content"].ToString());
            //        else
            //            Response.Redirect("Error.aspx");
            //        currentPage = Convert.ToInt32(Request.QueryString["currentPage"].ToString());
            //        dt = BOL.ProductManager.Instance.GetListProductsPaging("tbl_Product", "searchbox", currentPage, sizePage, content,
            //                                                                "Product_Name", BDS3M.Controls.SortProduct.sort, BDS3M.Controls.SortProduct.column);
            //    }
            //    else
            //    {
            //        if (Request.QueryString["content"] != null)
            //            content = (Request.QueryString["content"].ToString());
            //        else
            //            Response.Redirect("Error.aspx");
            //        dt = BOL.ProductManager.Instance.GetListProductsPaging("tbl_Product", "searchbox", 1, sizePage, content,
            //                                                                "Product_Name", BDS3M.Controls.SortProduct.sort, BDS3M.Controls.SortProduct.column);
            //        currentPage = 1;
            //    }
            //    catName = "Tìm kiếm sản phẩm ";
            //    AllCat = Convert.ToInt32(DAL.DCollector.DBCollector.Instance.StoredProcedureSelectWhereByID("tbl_Product", "Product_Name", content, "searchcountall").Rows[0]["count"].ToString());
            //}

        }
    }
}